<ul class="tabs">
	<li><a href="#tab1">Content</a></li>
	<li><a href="#tab2">Options</a></li>
</ul>
<div class="tab_container">
	<div id="tab1" class="tab_content">
		<div class="login">
			<?php if (validation_errors()): ?>
			<div class="error-box">
				<?php echo validation_errors();?>
			</div>
			<?php endif; ?>
		
			<?php if($this->session->flashdata('error')): ?>
			<div class="error">
				<?php echo $this->session->flashdata('error'); ?>
			</div>
			<?php endif; ?>
		
			<form action="<?php echo site_url('admin/admin/create'); ?>" method="post">
				<label for="title"><?php echo lang('admin_blog_title'); ?></label>
				<input name="title" id="title" type="text" size="50" value="<?php echo set_value('title'); ?>" class="styled" />
				<br/>
				<label for="url"><?php echo lang('admin_blog_url'); ?></label>
				<input name="url" id="url" type="text" size="50" class="styled" readonly="readonly" />
				<br/>
				<?php
					$options_status = array(
												'draft' => 'Draft',
												'live'  => 'Live'
											);
				?>
				<label for="status"><?php echo lang('admin_blog_status'); ?></label>
				<?php echo form_dropdown('status', $options_status, 'draft'); ?>
				<br/>
				<?php
					$options_type = array(
											''			 	=> '',
											'news' 		 	=> 'News',
											'announcement' 	=> 'Announcement'
										);
				?>
				<br/>
				<label for="type"><?php echo lang('admin_blog_type'); ?></label>
				<?php echo form_dropdown('type', $options_type, ''); ?>
				<br/>
				<label for="excerpt"><?php echo lang('admin_blog_excerpt'); ?></label>
				<?php echo form_textarea(array('name' => 'excerpt', 'id' => 'excerpt', 'rows' => '10', 'cols' => '100', 'value' => set_value('excerpt'))); ?>
				<br/>
				<label for="body"><?php echo lang('admin_blog_body'); ?></label>
				<?php echo form_textarea(array('name' => 'body', 'id' => 'body', 'rows' => '20', 'cols' => '100', 'value' => set_value('body'))); ?>
				<br>
				<fieldset id="action">
				<a href="#" class="btn btn-save"><span class="btn-icon disk-icon"></span><?php echo lang('admin_button_save'); ?></a>
				</fieldset>
		</div>
	</div>
	<div id="tab2" class="tab_content">
	   <div class="">
				<label for="blog_category"><?php echo lang('admin_blog_category'); ?></label>
				<?php echo form_dropdown('category', $categories, '0'); ?>
				<br/>
				<?php echo anchor('admin/categories/create', '[ Add a Category ]', array('class' => 'btn-modal')); ?>
				<br/>
				<br/>
				<label for="blog_date"><?php echo lang('admin_blog_date'); ?></label>
				<input name="date" id="date" type="text" size="50" class="styled" />
				<br>
				<fieldset id="action">
				<a href="#" class="btn btn-save"><span class="btn-icon disk-icon"></span><?php echo lang('admin_button_save'); ?></a>
				</fieldset>
			</form>
	   </div>
	</div>
</div>
<script>
$(document).ready(function(){
	$('.btn-save').click(function(){
		$('form').submit();
		return false;
	});
	$.facebox.settings.closeImage = '<?php echo image_path('facebox/closelabel.png'); ?>';
	$('.btn-modal').click(function(){
		$.facebox({
			ajax		 : $(this).attr('href')
		});
		return false;
	});
});
</script>